package com.wh.hotel.dao;

import com.wh.common.annotation.ResultLog;
import com.wh.common.enums.MethodTypeEnum;
import com.wh.hotel.constants.CommonConstant;
import com.wh.hotel.mapper.HotelTestMapper;
import com.wh.hotel.model.HotelTest;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author wenhao
 */
@Component
public class HotelTestDao {

    @Resource
    private HotelTestMapper hotelTestMapper;

    @ResultLog(name = "HotelTestDao.insert", methodType = MethodTypeEnum.DB, printResult = false)
    public boolean insert(HotelTest hotelTest) {
        return hotelTestMapper.insert(hotelTest) >= CommonConstant.SUCCESS_DB;
    }
}
